#include<stdio.h>
int issu(int n)
{
    int is = 1;
    for (int i = 2; i*i <= n; i++)
    {
        if (n%i==0)
        {
            is = 0;
            break;
        }
        
    }
    return is;
}

int main(void)
{
    int N;
    scanf("%d",&N);
    int a = 0,b = 0;
    for (int i = 0; i < N; i++)
    {
        int n;
        scanf("%d",&n);
        if(issu(n)) a++;
        if(n%2==0) b++;
    }
    printf("%d %d",a,b);
}